{{define "Title"}}工单过站查询{{end}}
{{define "Content"}}

<script type=text/javascript src="/js/splitPage.js"></script>
<script type=text/javascript src="/js/wopassed.js"></script>
<script type=text/javascript src="/js/tablestyle.js"></script>

<div class="container-fluid">
<form class="form-horizontal" action="/wopassed" method="POST">
  <fieldset>
    <legend><b>工单过站查询</b></legend>
    <div class="control-group">
      <label class="control-label">工单&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="wono" name="wono" style="font-weight: bold; text-transform:uppercase; background-color: #FFFFD0;" maxlength="30"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">站点&nbsp;</label>
      <div class="control">
        <select id="station" name="station"> 
          <option value="" >
          {{range .stations}}
            <option value="{{.Name | html}}">{{.Name | html}}
          {{end}}
        </select>
      </div>
    </div>
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">查询</button>
    </div>
  </fieldset>
</form>
</div>

{{if .wono}}
  {{if .stat}}
  <div class="control-group">
    <label class="control-label">工单:<b>{{.wono}}</b>  站点:<b>{{.stat}}</b>  过站数量:<b>{{.distinct_num}}</b></label>
  </div>
  <br/>
  {{else}}
  <div class="control-group">
    <label class="control-label">工单:<b>{{.wono}}</b>  站点:<b>All</b></label>
  </div>
  <br/>
  {{end}}
{{end}}

{{if .wopass}}
<div class="content-box">
<span id=obj1 style="color: black">
<table id="tbl_ls" border="1" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>索引</th>
      <th>物料</th>
      <th>描述</th>
      <th>产品序号</th>
      <th>站点</th>
      <th>结果</th>
      <th>作业员</th>
      <th>日期</th>
    </tr>
  </thead>
  
  <tbody id="group_one">
  {{range .wopass}}
  <tr>
    {{if eq .Result "PASS" "NDF"}}      
      <td id="detail_idx" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Index | html}}</td>
      <td id="detail_itm" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Item | html}}</td>
      <td id="detail_dsc" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Desc | html}}</td>
      <td id="detail_ssn" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px"><a href="/queryssn?q={{.Serial | html}}">{{.Serial | html}}</a></td>
      <td id="detail_sta" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Curr | html}}</td>
      <td id="detail_rst" fieldset style="background: #00CC00; border-style: groove; font-weight: bold; font-size: 14px">{{.Result | html}}</td>
      <td id="detail_ope" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Oper | html}}</td>
      <td id="detail_dat" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Date | html}}</td>
    {{else}}
      <td id="detail_idx" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Index | html}}</td>
      <td id="detail_itm" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Item | html}}</td>
      <td id="detail_dsc" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Desc | html}}</td>
      <td id="detail_ssn" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px"><a href="/queryssn?q={{.Serial | html}}">{{.Serial | html}}</a></td>
      <td id="detail_sta" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Curr | html}}</td>
      <td id="detail_rst" fieldset style="background: #E00000; color: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Result | html}}</td>
      <td id="detail_ope" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Oper | html}}</td>
      <td id="detail_dat" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px">{{.Date | html}}</td>
    {{end}}
  </tr>
  {{end}}
  </tbody>
</table>
</span>
</div>
<input type=hidden id="wonos" value="{{.wono | html}}">
<input type=hidden id="stats" value="{{.stat | html}}">
<input type=button id="wossnquery" value="ff" style="display:none">
<span id="spanFirst"><img id='first' src="/images/FirstPageImageUrl.gif" onclick="onFirstClick();"/></span> <span id="spanPre"><img id='prev' src="/images/PreviousPageImageUrl.gif" onclick="onPrevClick();"/></span> <span id="spanNext"><img id='next' src="/images/NextPageImageUrl.gif" onclick="onNextClick();"/></span> <span id="spanLast"><img id='last' src="/images/LastPageImageUrl.gif" onclick="onLastClick();"/></span> 当前页: <span id="spanPageNum">{{.curr_page}}</span> / 总页数: <span id="spanTotalPage">{{.total_page}}</span> <span><input id="specialnum" style="width: 60px; color: blue; font-size: 14px; font-weight: bold;" type="text" onkeydown="onSpecialKeydown();"></span><span id="GotoSpecial" style="font-size: 14px; font-weight: bold; cursor:hand; text-decoration:underline; color: #57a000;" onclick="onSpecialClick();">Goto!</span>
{{end}}

{{end}}